import { ServiceProto } from 'tsrpc-proto';
import { ReqLogin, ResLogin } from './login/PtlLogin';
import { ReqLoginByDYin, ResLoginByDYin } from './login/PtlLoginByDYin';
import { ReqRegist, ResRegist } from './login/PtlRegist';

export interface ServiceType {
    api: {
        "login/Login": {
            req: ReqLogin,
            res: ResLogin
        },
        "login/LoginByDYin": {
            req: ReqLoginByDYin,
            res: ResLoginByDYin
        },
        "login/Regist": {
            req: ReqRegist,
            res: ResRegist
        }
    },
    msg: {

    }
}

export const serviceProto: ServiceProto<ServiceType> = {
    "version": 4,
    "services": [
        {
            "id": 0,
            "name": "login/Login",
            "type": "api",
            "conf": {}
        },
        {
            "id": 2,
            "name": "login/LoginByDYin",
            "type": "api",
            "conf": {}
        },
        {
            "id": 1,
            "name": "login/Regist",
            "type": "api",
            "conf": {}
        }
    ],
    "types": {
        "login/PtlLogin/ReqLogin": {
            "type": "Interface",
            "extends": [
                {
                    "id": 0,
                    "type": {
                        "type": "Reference",
                        "target": "../protocols/base/BaseRequest"
                    }
                }
            ],
            "properties": [
                {
                    "id": 0,
                    "name": "account",
                    "type": {
                        "type": "String"
                    }
                },
                {
                    "id": 1,
                    "name": "password",
                    "type": {
                        "type": "String"
                    }
                }
            ]
        },
        "../protocols/base/BaseRequest": {
            "type": "Interface",
            "properties": [
                {
                    "id": 0,
                    "name": "session",
                    "type": {
                        "type": "String"
                    }
                }
            ]
        },
        "login/PtlLogin/ResLogin": {
            "type": "Interface",
            "extends": [
                {
                    "id": 0,
                    "type": {
                        "type": "Reference",
                        "target": "../protocols/base/BaseResponse"
                    }
                }
            ],
            "properties": [
                {
                    "id": 0,
                    "name": "token",
                    "type": {
                        "type": "String"
                    }
                },
                {
                    "id": 1,
                    "name": "gameUrl",
                    "type": {
                        "type": "String"
                    }
                }
            ]
        },
        "../protocols/base/BaseResponse": {
            "type": "Interface"
        },
        "login/PtlLoginByDYin/ReqLoginByDYin": {
            "type": "Interface",
            "extends": [
                {
                    "id": 0,
                    "type": {
                        "type": "Reference",
                        "target": "../protocols/base/BaseRequest"
                    }
                }
            ],
            "properties": [
                {
                    "id": 0,
                    "name": "openId",
                    "type": {
                        "type": "String"
                    }
                },
                {
                    "id": 1,
                    "name": "name",
                    "type": {
                        "type": "String"
                    }
                },
                {
                    "id": 2,
                    "name": "icon",
                    "type": {
                        "type": "String"
                    }
                }
            ]
        },
        "login/PtlLoginByDYin/ResLoginByDYin": {
            "type": "Interface",
            "extends": [
                {
                    "id": 0,
                    "type": {
                        "type": "Reference",
                        "target": "../protocols/base/BaseResponse"
                    }
                }
            ],
            "properties": [
                {
                    "id": 0,
                    "name": "token",
                    "type": {
                        "type": "String"
                    }
                },
                {
                    "id": 1,
                    "name": "gameUrl",
                    "type": {
                        "type": "String"
                    }
                }
            ]
        },
        "login/PtlRegist/ReqRegist": {
            "type": "Interface",
            "extends": [
                {
                    "id": 0,
                    "type": {
                        "type": "Reference",
                        "target": "../protocols/base/BaseRequest"
                    }
                }
            ],
            "properties": [
                {
                    "id": 0,
                    "name": "account",
                    "type": {
                        "type": "String"
                    }
                },
                {
                    "id": 1,
                    "name": "password",
                    "type": {
                        "type": "String"
                    }
                }
            ]
        },
        "login/PtlRegist/ResRegist": {
            "type": "Interface",
            "extends": [
                {
                    "id": 0,
                    "type": {
                        "type": "Reference",
                        "target": "../protocols/base/BaseResponse"
                    }
                }
            ],
            "properties": [
                {
                    "id": 0,
                    "name": "token",
                    "type": {
                        "type": "String"
                    }
                },
                {
                    "id": 1,
                    "name": "gameUrl",
                    "type": {
                        "type": "String"
                    }
                }
            ]
        }
    }
};